﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Admin/MasterPage/Home.Master" AutoEventWireup="true" CodeBehind="RecycleBin.aspx.cs" Inherits="TTMarketing.Admin.RecycleBin" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHeader" runat="server">
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceMain" runat="server">
<asp:Panel ID="plContent" runat="server">
    <div id="close">
            <table width="100%">
                <tr>
                    <td>
                        <asp:Label ID="lblTitle" runat="server" Style="font-size: 30px" 
                            Text="Thùng Rác"></asp:Label>
                    </td>
                    <td align="right" width="100px">
                        <asp:Label ID="lblStt" runat="server" Text="Trạng thái "></asp:Label>
                        <telerik:RadComboBox ID="cmbClose" runat="server" AutoPostBack="True" OnSelectedIndexChanged="cmbClose_SelectedIndexChanged"
                            Width="100px" ondatabound="cmbClose_DataBound">
                            <Items>
                                <telerik:RadComboBoxItem runat="server" Text="Close" Value="0" />
                                <telerik:RadComboBoxItem runat="server" Text="Open" Value="1" />
                            </Items>
                        </telerik:RadComboBox>
                    </td>
                </tr>
            </table>
        </div>
        <div id="divmessage2" runat="server">
        </div>
        <asp:Panel ID="plDetailAll" runat="server" Width="100%">
        <div id="divmessage" runat="server">
            </div>
            <fieldset>
                <legend>Thông tin loại</legend>
                <table width="100%">
                    <tr>
                        <td width="200px">
                            <asp:Label ID="lblUserName" runat="server" Text="Tên loại"></asp:Label>
                        </td>
                        <td>
                            <telerik:RadComboBox ID="cmbType" Runat="server" Width="100%" 
                                DataTextField="Name" DataValueField="ID" 
                                AutoPostBack="True">
                            </telerik:RadComboBox>
                        </td>
                    </tr>
                   
                </table>
                
            </fieldset>
        </asp:Panel>
        <asp:Panel ID="Panel2" runat="server" Width="100%">
            <asp:MultiView ID="mvRecycleBin" runat="server">
                <asp:View ID="vCateProduct" runat="server">
                    <telerik:RadGrid ID="rgdCateProduct" runat="server" AllowPaging="True" 
                        AllowSorting="True" DataSourceID="odsCateProduct" GridLines="None" 
                        OnItemCommand="rgdCateProduct_ItemCommand" ShowFooter="True">
                        <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="True" 
                            EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False" DataSourceID="odsCateProduct">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="Mã" 
                                    SortExpression="ID" UniqueName="ID">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Tên" 
                                    SortExpression="Name" UniqueName="Name">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="tblTypeProduct.Name" HeaderText="Thể loại" 
                                    SortExpression="tblTypeProduct.Name" UniqueName="TypeProduct">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Number" DataType="System.Int32" 
                                    HeaderText="Số hiệu" SortExpression="Number" UniqueName="Number">
                                </telerik:GridBoundColumn>
                                <telerik:GridCheckBoxColumn DataField="Visible" DataType="System.Boolean" 
                                    HeaderText="Ẩn" SortExpression="Visible" UniqueName="Visible">
                                </telerik:GridCheckBoxColumn>
                                <telerik:GridTemplateColumn HeaderText="Action" UniqueName="TemplateColumn">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ImageButton2" runat="server" 
                                            CommandArgument='<%# Eval("ID") %>' CommandName="delete" 
                                            ImageUrl="~/Admin/Images/Button/Delete_Grid.gif" 
                                            OnClientClick=" return confirm(&quot;Bạn có chắc chắn muốn xóa?&quot;);" />
                                    </ItemTemplate>
                                    <ItemStyle Width="40px" />
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                        <HeaderContextMenu EnableAutoScroll="True">
                        </HeaderContextMenu>
                    </telerik:RadGrid>
                    <asp:ObjectDataSource ID="odsCateProduct" runat="server" 
                        SelectMethod="getStatus" TypeName="TTBusiness.ClassDB.clsBSCateProduct">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="false" Name="status" Type="Boolean" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </asp:View>
                <asp:View ID="vFactoryProduct" runat="server">
                    <telerik:RadGrid ID="rgdFactoryProduct" runat="server" AllowPaging="True" 
                        AllowSorting="True" DataSourceID="odsManuFactory" GridLines="None" 
                        onitemcommand="rgdFactoryProduct_ItemCommand" ShowFooter="True">
                        <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="True" 
                            EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False" DataSourceID="odsManuFactory">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="Mã" 
                                    SortExpression="ID" UniqueName="ID">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Tên" 
                                    SortExpression="Name" UniqueName="Name">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Number" DataType="System.Int32" 
                                    HeaderText="Số hiệu" SortExpression="Number" UniqueName="Number">
                                </telerik:GridBoundColumn>
                                <telerik:GridCheckBoxColumn DataField="Visible" DataType="System.Boolean" 
                                    HeaderText="Ẩn" SortExpression="Visible" UniqueName="Visible">
                                </telerik:GridCheckBoxColumn>
                                <telerik:GridTemplateColumn HeaderText="Action" UniqueName="TemplateColumn">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ImageButton3" runat="server" 
                                            CommandArgument='<%# Eval("ID") %>' CommandName="delete" 
                                            ImageUrl="~/Admin/Images/Button/Delete_Grid.gif" 
                                            OnClientClick=" return confirm(&quot;Bạn có chắc chắn muốn xóa?&quot;);" />
                                    </ItemTemplate>
                                    <ItemStyle Width="40px" />
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                        <HeaderContextMenu EnableAutoScroll="True">
                        </HeaderContextMenu>
                    </telerik:RadGrid>
                    <asp:ObjectDataSource ID="odsManuFactory" runat="server" 
                        SelectMethod="getStatus" TypeName="TTBusiness.ClassDB.clsBSManuFactory">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="false" Name="status" Type="Boolean" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </asp:View>
                <asp:View ID="vProduct" runat="server">
                    <telerik:RadGrid ID="rgdProduct" runat="server" AllowPaging="True" 
                        AllowSorting="True" DataSourceID="odsProduct" GridLines="None" 
                        onitemcommand="rgdProduct_ItemCommand" ShowFooter="True">
                        <ClientSettings AllowColumnsReorder="True" EnablePostBackOnRowClick="True" 
                            EnableRowHoverStyle="True" ReorderColumnsOnClient="True">
                            <Selecting AllowRowSelect="True" />
                        </ClientSettings>
                        <MasterTableView AutoGenerateColumns="False" DataSourceID="odsProduct">
                            <RowIndicatorColumn>
                                <HeaderStyle Width="20px" />
                            </RowIndicatorColumn>
                            <ExpandCollapseColumn>
                                <HeaderStyle Width="20px" />
                            </ExpandCollapseColumn>
                            <Columns>
                                <telerik:GridBoundColumn DataField="ID" DataType="System.Int32" HeaderText="ID" 
                                    SortExpression="ID" UniqueName="ID">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Name" HeaderText="Tên sản phẩm" 
                                    SortExpression="Name" UniqueName="Name">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="Price" DataType="System.Double" 
                                    HeaderText="Giá" SortExpression="Price" UniqueName="Price">
                                </telerik:GridBoundColumn>
                                <telerik:GridBoundColumn DataField="View" DataType="System.String" 
                                    HeaderText="Xem" SortExpression="View" UniqueName="View">
                                </telerik:GridBoundColumn>
                                <telerik:GridTemplateColumn HeaderText="Thông tin" UniqueName="Detail">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbtnDetail" runat="server" 
                                            PostBackUrl='<%# "ProductDetail.aspx?id=" + Eval("ID") %>'>Thêm</asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle Width="40px" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Trạng thái" UniqueName="Status">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbtnStatus" runat="server" 
                                            PostBackUrl='<%# "StatusProduct.aspx?id=" + Eval("ID") %>'>Thêm</asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle Width="40px" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Hình ảnh" UniqueName="Image">
                                    <ItemTemplate>
                                        <asp:LinkButton ID="lbtnImage2" runat="server" 
                                            PostBackUrl='<%# "ImageProduct.aspx?id=" + Eval("ID") %>'>Thêm</asp:LinkButton>
                                    </ItemTemplate>
                                    <ItemStyle Width="40px" />
                                </telerik:GridTemplateColumn>
                                <telerik:GridTemplateColumn HeaderText="Action" UniqueName="TemplateColumn">
                                    <ItemTemplate>
                                        <asp:ImageButton ID="ImageButton4" runat="server" 
                                            CommandArgument='<%# Eval("ID") %>' CommandName="delete" 
                                            ImageUrl="~/Admin/Images/Button/Delete_Grid.gif" 
                                            OnClientClick=" return confirm(&quot;Bạn có chắc chắn muốn xóa?&quot;);" />
                                    </ItemTemplate>
                                    <ItemStyle Width="40px" />
                                </telerik:GridTemplateColumn>
                            </Columns>
                        </MasterTableView>
                        <HeaderContextMenu EnableAutoScroll="True">
                        </HeaderContextMenu>
                    </telerik:RadGrid>
                    <asp:ObjectDataSource ID="odsProduct" runat="server" SelectMethod="getStatus" 
                        TypeName="TTBusiness.ClassDB.clsBSProduct">
                        <SelectParameters>
                            <asp:Parameter DefaultValue="false" Name="status" Type="Boolean" />
                        </SelectParameters>
                    </asp:ObjectDataSource>
                </asp:View>
                <asp:View ID="vTypeProduct" runat="server">
                </asp:View>
                <asp:View ID="vTypeNews" runat="server">
                </asp:View>
                <asp:View ID="vCateNews" runat="server">
                </asp:View>
                <asp:View ID="vNews" runat="server">
                </asp:View>
            </asp:MultiView>
        </asp:Panel>
    </asp:Panel>
    <telerik:RadAjaxManager runat="server" ID="RadAjaxManager1" 
        EnableHistory="True">
        <AjaxSettings>
            <telerik:AjaxSetting AjaxControlID="btnSaveNew">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2" />
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid" />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnSave">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid"  />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="rgdGrid">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="cmbClose" />
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnReset">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2" />
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid" />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail"  />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="btnClear">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbClose">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid" />
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="plDetail" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbType">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid" />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail" />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbCate">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid" />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail"  />
                </UpdatedControls>
            </telerik:AjaxSetting>
            <telerik:AjaxSetting AjaxControlID="cmbFactory">
                <UpdatedControls>
                    <telerik:AjaxUpdatedControl ControlID="divmessage2"  />
                    <telerik:AjaxUpdatedControl ControlID="rgdGrid" />
                    <telerik:AjaxUpdatedControl ControlID="plDetailAll" LoadingPanelID="Loading" UpdatePanelRenderMode="Inline" />
                    <telerik:AjaxUpdatedControl ControlID="plDetail"/>
                </UpdatedControls>
            </telerik:AjaxSetting>
        </AjaxSettings>
    </telerik:RadAjaxManager>
</asp:Content>
